﻿
function fncMarqueeUp(pDiv, pSpeed) {
    var k = jQuery("#" + pDiv + " .VNTDiv1").height();
    var h = jQuery("#" + pDiv).height();
    if (k < h) { k = h; }
    jQuery("#" + pDiv + " .VNTDiv1").css("top", 0 + 'px');
    jQuery("#" + pDiv + " .VNTDiv2").css("top", k + 'px');

    fncScrollUp(pDiv, pSpeed);
}

function fncScrollUp(pDiv, pSpeed) {
    var bScroll = parseInt(jQuery("#" + pDiv + " .lblScroll").text());
    if (bScroll > 0) {
        var m = jQuery("#" + pDiv + " .VNTDiv1").position().top;
        var n = jQuery("#" + pDiv + " .VNTDiv2").position().top;
        var k = jQuery("#" + pDiv + " .VNTDiv1").height();
        var h = jQuery("#" + pDiv).height();
        if (k < h) { k = h; }

        if (m == 0) { n = k; }
        if (n == 0) { m = k; }

        jQuery("#" + pDiv + " .VNTDiv1").css("top", --m + 'px');
        jQuery("#" + pDiv + " .VNTDiv2").css("top", --n + 'px');
    }
    setTimeout('fncScrollUp("' + pDiv + '", ' + pSpeed + ')', pSpeed);
}

function fncStop(pDiv) {
    var bScroll = parseInt(jQuery("#" + pDiv + " .lblScroll").text());
    if (bScroll > 0) {
        jQuery("#" + pDiv + " .lblScroll").text('0');
    }
}

function fncStart(pDiv) {
    var bScroll = parseInt(jQuery("#" + pDiv + " .lblScroll").text());
    if (bScroll == 0) {
        jQuery("#" + pDiv + " .lblScroll").text('1');
    }
}

    
